/**
 * Created by QKL on 2017/4/12.
 */
$(function () {
    $('.backtotop').on('click', function () {
        var win_tops = $(window).scrollTop()
        $('body,html,window').animate({scrollTop: 0}, 500)
    });
    //返回顶部
    $(window).scroll(function () {
        var win_top = $(window).scrollTop()
        var win_height = $(window).innerHeight();
        if (win_top > win_height) {
            $('.backtotop').show();
        }
        if (win_top < win_height) {
            $('.backtotop').hide();
        }
    })
  //判断返回顶部按钮出现，当滚动条大于屏幕高度时，出现滚动

})